package com.dao;

import com.entity.Buyer;
import com.page.PageInfo;

import java.util.List;

public interface BuyerDao {
    public Buyer getByBuid(String buid);
    public List<Buyer> getAll();
    public List<Buyer> getAllByPage(PageInfo pageInfo);
    public List<Buyer> searchNameByPage(PageInfo pageInfo, String adname);
    /**
     * 根据主键查询
     * @param buid
     * @return
     */
    public Buyer getBuyerByBuid(String buid);

    /**
     * 添加一个实体
     * @param buyer
     * @return
     */
    public int addBuyer(Buyer buyer);
    /**
     * 修改实体
     */
    public int updateBuyer(Buyer buyer);
    public int updateBuyerByExample(Buyer buyer);

    /**
     * 删除一个实体
     * @param buid
     * @return
     */
    public int deleteBuyerByPrimayKey(String buid);

    /**
     * 删除实体根据示例
     * @return
     */
    public int deleteBuyerByExample();


    public Buyer getByBuidWithOrderInfos(String buid);
}
